bpf: force strict alignment checks for stack pointers
authorJann Horn <jannh@google.com>
Tue, 19 Dec 2017 04:11:58 +0000 (20:11 -0800)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 22 Dec 2017 14:12:23 +0000 (14:12 +0000)
commitc4832039dcfbef771a8b58b79fa7254121192eb2
treef05f0b7e06aaf3e4000885c3997cbe7f3d347cf0
parentb051d0a5bca367dbafe5edf8e3aab9c9c9ce59ae
bpf: force strict alignment checks for stack pointers

Force strict alignment checks for stack pointers because the tracking of
stack spills relies on it; unaligned stack accesses can lead to corruption
of spilled registers, which is exploitable.

Fixes: f1174f77b50c ("bpf/verifier: rework value tracking")
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name bpf-force-strict-alignment-checks-for-stack-pointers.patch
kernel/bpf/verifier.c